package reflect;

/**
 * @author DBX
 * @effect
 * @date 2021/09/11/16:07
 */
@AutoRunClass
public class User {
    private static String id = "123";
    protected  String name = "zs";
    public String sex = "男";
     int age = 10;

    public User() {
        System.out.println("无参构造方法");
    }
    static {
        System.out.println("静态代码块执行了");
    }
    @AutoRun(5)
    public void sayHello(){
        System.out.println("大家好，我叫"+name);
    }
    public void say(String s){
        System.out.println(s);
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                '}';
    }

    public User(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }
    @AutoRun
    public void playGame(){
        System.out.println("用户正在玩游戏");
    }
    public void sing(){
        System.out.println("用户唱歌中");
    }
    public void doSome(){
        System.out.println("doSome....");
    }
    private void fun(){
        System.out.println("私有方法fun");
    }
}
